package com.jgy.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 姜光远
 * @date 2022/11/30 18:52
 */
public class DateUtil {
    public static final String DEFAULT_DATE_FORMT = "yyyy-MM-dd HH:mm:ss";

    public static String getCuurentDateStr(){
        SimpleDateFormat f = new SimpleDateFormat(DEFAULT_DATE_FORMT);
        return f.format(new Date());
    }

    public static String getCuurentDateStr( String time){
        SimpleDateFormat f = new SimpleDateFormat(DEFAULT_DATE_FORMT);
        return f.format(new Date());
    }
}